package cn.qyd.concurrentcollection;

import java.util.concurrent.LinkedBlockingDeque;

/**
 * @author 邱运铎
 * @date 2024-03-22 22:25
 */
public class LinkedBlockingDequeDemo {
    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingDeque<String> deque = new LinkedBlockingDeque<>();
        deque.addLast("Item1");
        deque.addLast("Item2");
        deque.addFirst("Item3");

        System.out.println(deque.takeLast());
        System.out.println(deque.takeFirst());
    }
}
